package com.zheng.wechat.mp.dao.model;

import java.io.Serializable;
import java.util.Date;

public class WechatMpWxappfrommessage implements Serializable {
    /**
     * ID
     *
     * @mbg.generated
     */
    private Integer id;

    /**
     * 用户ID
     *
     * @mbg.generated
     */
    private Integer userId;

    /**
     * 表单id类型.0,提交表单，1,支付
     *
     * @mbg.generated
     */
    private Integer formidtype;

    /**
     * formid或prepay_id
     *
     * @mbg.generated
     */
    private String formid;

    /**
     * 创建时间
     *
     * @mbg.generated
     */
    private Date createTime;

    /**
     * 失效时间
     *
     * @mbg.generated
     */
    private Date endTime;

    /**
     * 用户状态，0-已使用，1-正常
     *
     * @mbg.generated
     */
    private Integer status;

    /**
     * 可使用次数
     *
     * @mbg.generated
     */
    private Integer totaltimes;

    /**
     * 已使用次数
     *
     * @mbg.generated
     */
    private Integer usetimes;

    /**
     * 最后使用时间
     *
     * @mbg.generated
     */
    private Date lastUseTime;

    /**
     * 发送内容
     *
     * @mbg.generated
     */
    private String remark;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getFormidtype() {
        return formidtype;
    }

    public void setFormidtype(Integer formidtype) {
        this.formidtype = formidtype;
    }

    public String getFormid() {
        return formid;
    }

    public void setFormid(String formid) {
        this.formid = formid;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getTotaltimes() {
        return totaltimes;
    }

    public void setTotaltimes(Integer totaltimes) {
        this.totaltimes = totaltimes;
    }

    public Integer getUsetimes() {
        return usetimes;
    }

    public void setUsetimes(Integer usetimes) {
        this.usetimes = usetimes;
    }

    public Date getLastUseTime() {
        return lastUseTime;
    }

    public void setLastUseTime(Date lastUseTime) {
        this.lastUseTime = lastUseTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", formidtype=").append(formidtype);
        sb.append(", formid=").append(formid);
        sb.append(", createTime=").append(createTime);
        sb.append(", endTime=").append(endTime);
        sb.append(", status=").append(status);
        sb.append(", totaltimes=").append(totaltimes);
        sb.append(", usetimes=").append(usetimes);
        sb.append(", lastUseTime=").append(lastUseTime);
        sb.append(", remark=").append(remark);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WechatMpWxappfrommessage other = (WechatMpWxappfrommessage) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getFormidtype() == null ? other.getFormidtype() == null : this.getFormidtype().equals(other.getFormidtype()))
            && (this.getFormid() == null ? other.getFormid() == null : this.getFormid().equals(other.getFormid()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getTotaltimes() == null ? other.getTotaltimes() == null : this.getTotaltimes().equals(other.getTotaltimes()))
            && (this.getUsetimes() == null ? other.getUsetimes() == null : this.getUsetimes().equals(other.getUsetimes()))
            && (this.getLastUseTime() == null ? other.getLastUseTime() == null : this.getLastUseTime().equals(other.getLastUseTime()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getFormidtype() == null) ? 0 : getFormidtype().hashCode());
        result = prime * result + ((getFormid() == null) ? 0 : getFormid().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getTotaltimes() == null) ? 0 : getTotaltimes().hashCode());
        result = prime * result + ((getUsetimes() == null) ? 0 : getUsetimes().hashCode());
        result = prime * result + ((getLastUseTime() == null) ? 0 : getLastUseTime().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        return result;
    }
}